<%-------------------------------------------------------------------
 * 页面名称：resetLoginPassByEmail.jsp
 * 功能描述：忘记登录密码-->使用Email申请重置登录密码
 * Action  :
 *
 *-------------------------------------------------------------------
--%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib prefix="ad" uri="agiledata"%>
<%
	String path = request.getContextPath();
%>
<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/font.css" rel="stylesheet" type="text/css" />
<script type='text/javascript' src='<%=path%>/js/vnv/commonForManage.js'></script>
<script type='text/javascript'
	src='<%=path%>/js/vnv/passwordStrength.js'></script>
<script language="javascript" src="<%=path%>/js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/PassGuardCtrl.js"></script>
<script type="text/javascript" src="<%=path%>/js/demo.js"></script>
<link href="<%=path%>/css/newstyle.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/common.css" rel="stylesheet" type="text/css" />
<SCRIPT LANGUAGE="JavaScript">
function submitProcess() {
	var formObj = document.forms["0"];
	 var emailregx="^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$";
	if (checkNecessaryInput(formObj)) {
		 if(!RegExp(emailregx).test(getObj("email").value)){
		 alert("Email地址格式不正确，请重新填写！");
			return false;
		 }
		if(pgeditor.pwdLength()==0){
			     alert("新密码不能为空！");
				 _$("_ocx_password").focus();
				 return false;
			}
			if(pgeditor.pwdValid()==1){
				alert("新密码在8到20位！");
				 _$("_ocx_password").focus();
				 return false;
			}
			
			if(pgeditor.pwdStrength()<3){
			     alert("新密码至少是数字字母符号的两种组合！");
				 _$("_ocx_password").focus();
				 return false;
			}
			
			if(pgeditor1.pwdHash()!=pgeditor.pwdHash()){
			     alert("两次输入密码不一致！");
				 _$("_ocx_password1").focus();
				 return false;
			}	
			SubmitForm();
			var PwdResult=pgeditor.pwdResult();
			getObj('newPass').value=PwdResult;
			formObj.submit();
	}
}

window.onload = function(){	 
	   pgeditor.pgInitialize();//初始化控件
	   pgeditor1.pgInitialize();//初始化控件
	   window.setInterval("GetLevel()",800);
 }
</SCRIPT>
<div id="mainFrame">
	<div class="login_logo">
		<!--  <img src="<%=path%>/images/LOGO-4_a.jpg" />-->
	</div>
	<div class="rightSider3">
		<div class="sub_title">
			<span class="bluefont18bdrop">重置登录密码</span>
		</div>
		<div class="edit_pass">
			<table width="100%" border="0" align="center" cellpadding="5"
				cellspacing="1">
				<html:form action="/resetLoginPasswordByEmail.do">
					<tr>
						<td width="40%" align="right">
							<span class="orang12b">*</span>Email地址：
						</td>
						<td width="60%">
							<html:text property="email" alt="Email地址" maxlength="64"
								size="35" styleClass="inputStyle" />
						</td>
					</tr>
					<tr>
						<td align="right">
							<span class="orang12b">*</span>确 认 码：
						</td>
						<td>
							<html:text property="resetCode" alt="确 认 码" maxlength="64"
								size="35" styleClass="inputStyle" />
						</td>
						<td>
						</td>
					</tr>
					<tr>
						<td align="right">
							<span class="orang12b">*</span>新 密 码：
						</td>
						<td>
							<script type="text/javascript">pgeditor.generate()</script>
							<input id="newPass" name="newPass" type="hidden" />
							<br>
							<font size="14px;" color="#F06622">（6-20位至少是数字字母特殊符号的两种组合）</font>
						</td>
						<td>
						
						</td>
					</tr>
					<tr>
						<td align="right">
							<span class="orang12b">*</span>重复新密码：
						</td>
						<td>
							<script type="text/javascript">pgeditor1.generate()</script>
							<input id="reNewPass" name="reNewPass" type="hidden" />

						</td>
						<td></td>
					</tr>
				</html:form>
				<tr>
					<td align="right"></td>
					<td>
						<input type="button" name="sure" value="确 定" class="button_style"
							onclick="submitProcess();" />
						<input type="button" name="return" value="返回上一步"
							class="button_style"
							onclick="location.href='<%=path%>/toForgot.do';" />
						<input type="button" name="return" value="返回首页"
							class="button_style" onclick="location.href='<%=path%>/main.do';"
							style="margin-right: 20px;" />
					</td>
				</tr>
			</table>
		</div>
	</div>
</div>